*** This .do file contains the analyses for:
	* Emotions on our screens
	* Andrews, Olson, & Krupnikov

* Install required packages: 
* ssc install grc1leg2
* ssc install estout
* ssc install coefplot

set scheme plotplain

* Set working directory to folder containing replication materials
	capture cd "YOUR WORKING DIRECTORY HERE"
	
**# Study 1 ********************************************************************

* Import data
import delimited "Study 1.csv", clear

	* Cleaning
		
		* Label conditions
			
			* Emotion treatment
			lab def emotion 0 "Control" 1 "Sadness" 2 "Fear"
			lab val emotion_treat emotion

			* Gender treatment
			lab def gender 0 "Man" 1 "Woman"
			lab val fem_treat gender

		* Clean independent variables
		
			* Worry (pre-treatment)
			gen pre_worry = (ccimportant - 1)/9
			
			* Gender
			gen woman = 0 if gender != .
				replace woman = 1 if gender == 1
				lab var woman "Woman"
				
			* Age
			replace age = (age-2)/6
				lab var age "Age"
				
			* Indicator for identifying as white (and only white)
			gen white = 0 if race != ""
				replace white = 1 if race == "1"
				lab var white "White"
				
			* Education
			replace educ = (educ - 1)/4
				lab var educ "Education"
				
			* Partisanship
			gen pid3 = 0 if pid == 2
				replace pid3 = 1 if pid == 1
				replace pid3 = 2 if pid > 2
				
				lab def pid3 0 "Republican" 1 "Democrat" 2 "Other"
				lab val pid3 pid3
				
			recode pid3 (0 = 1 "Republican") (1/2 = 0 "Other"), gen(republican)
				lab var republican "Republican"

		* Clean dependent variables to range from 0-1
			
			* Worry (post treatment)
			gen worry = (ccimportant2 - 1)/9
			
			* Appropriate
			replace appro = (appro - 1)/4
			
			* Knowledge
			replace know = (know - 1)/4
			
			* Discuss with speaker
			replace discuss = (discuss - 1)/4
			
			* Efficacy
			replace effic1 = (effic1 - 1)/4
			replace effic2 = (effic2 - 1)/4
			
			gen effic = (effic1 + effic2)/2
			
	* Main text analysis
	
		* Figure 4.1: Predicted agreement speaker is appropriate
		reg appro i.emotion_treat i.fem_treat // appropriate
			margins, over(emotion_treat)  
			marginsplot, recast(scatter) recastci(rspike) ///
				plot1opts(color(black) msymbol(circle)) ci1opts(color(black)) ///
				xlabel(0 "Control" 1 "Sadness" 2 "Fear", nogrid labsize(med)) ///
				ytitle("Predicted Perceived Appropriateness") xtitle("Condition") ///
				ylabel(0.4(0.2).8, nogrid labsize(med)) title("")
			graph export "Fig41.png", height(1500) replace
		
		* Figure 4.2: Predicted agreement speaker is appropriate
		reg appro i.emotion_treat##i.fem_treat 
			margins, over(fem_treat) at(emotion_treat = (0(1)2))
			mplotoffset, recast(scatter) recastci(rspike) ///
				plot1opts(color(black) msymbol(circle)) ci1opts(color(black)) ///
				plot2opts(color(gray) msymbol(triangle)) ci2opts(color(gray)) ///
				xlabel(0 "Control" 1 "Sadness" 2 "Fear", nogrid labsize(med)) ///
				ytitle("Predicted Perceived Appropriateness") xtitle("Condition") ///
				ylabel(0.4(0.2).8, nogrid labsize(med)) title("") ///
				legend(title("Speaker Gender") order(3 "Man" 4 "Woman") col(2) pos(6) ///
				region(lcolor(black)))
			graph export "Fig42.png", height(1500) replace
	
	* Online Appendix
		
		* Figure B.1.1: Post-treatment worry about climate change & efficacy by treatment
		forvalues k = 0/2 {
			reg worry i.emotion_treat i.fem_treat pre_worry // worry
				margins, over(emotion_treat) subpop(if emotion_treat == `k') post
				eststo worry_main`k'
				
			reg effic1 i.emotion_treat  i.fem_treat // effic 1
				margins, over(emotion_treat) subpop(if emotion_treat == `k') post
				eststo effic1_main`k'
				
			reg effic2 i.emotion_treat i.fem_treat // effic 2
				margins, over(emotion_treat) subpop(if emotion_treat == `k') post
				eststo effic2_main`k'
			}
				
			coefplot (worry_main0, msymbol(circle) color(black) ciopts(lcolor(black))) ///
				(worry_main1, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(worry_main2, msymbol(triangle) color(maroon)  ciopts(lcolor(maroon))) ///
				(effic1_main0, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(effic1_main1, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(effic1_main2, msymbol(triangle) color(maroon)  ciopts(lcolor(maroon))) ///
				(effic2_main0, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(effic2_main1, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(effic2_main2, msymbol(triangle) color(maroon)  ciopts(lcolor(maroon))), ///
				vertical title("") ytitle("Predicted Value") ///
				ylabel(0.4(0.2).8, nogrid labsize(med)) xlabel(0.7 "Worry" 1 "Efficacy (1)" 1.3 "Efficacy (2)", labsize(med)) ///
				xline(0.85, lpattern(dash) lcolor(gs12)) xline(1.15, lpattern(dash) lcolor(gs12)) ///
				legend(order(2 "Control" 4 "Sadness" 6 "Fear") col(3) subtit("Emotion Treatment") pos(6) ///
				region(lcolor(black))) 
			graph export "FigB11.png", height(1500) replace
		
		* Figure B.1.2: Agreement speaker is knowledgable and willingness to discuss climate change with speaker
		forvalues k = 0/2 {	
			reg know i.emotion_treat i.fem_treat // knowledgeable
				margins, over(emotion_treat) subpop(if emotion_treat == `k') post
				eststo know_main`k'
				
			reg discuss i.emotion_treat i.fem_treat // discuss with speaker
				margins, over(emotion_treat) subpop(if emotion_treat == `k') post
				eststo discuss_main`k'	
		}
		
			coefplot (know_main0, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(know_main1, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(know_main2, msymbol(triangle) color(maroon)  ciopts(lcolor(maroon))) ///
				(discuss_main0, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(discuss_main1, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(discuss_main2, msymbol(triangle) color(maroon)  ciopts(lcolor(maroon))), ///
				vertical title("") ytitle("Predicted Value") ///
				ylabel(0.4(0.2).8, nogrid labsize(med)) xlabel(0.8 `" "Speaker""knowledgeable" "'  1.25 `" "Discuss with""speaker" "' , labsize(med)) ///
				xline(1, lpattern(dash) lcolor(gs12))  ///
				legend(order(2 "Control" 4 "Sadness" 6 "Fear") col(3) subtit("Emotion Treatment") pos(6) ///
				region(lcolor(black)))
			graph export "FigB12.png", height(1500) replace
			
		* Table B1.1: Effect of treatment on speaker evaluations 
			eststo: reg appro i.emotion_treat i.fem_treat 
			eststo: reg appro i.emotion_treat i.fem_treat age educ i.republican i.woman i.white
			eststo: reg know i.emotion_treat i.fem_treat 
			eststo: reg know i.emotion_treat i.fem_treat age educ i.republican i.woman i.white
			eststo: reg discuss i.emotion_treat i.fem_treat 
			eststo: reg discuss i.emotion_treat i.fem_treat age educ i.republican i.woman i.white
	
				esttab using"TableB11.rtf", replace var(22) model(10) ///
					nobase noomit b(3) se wide one interact(" x ") ///
					title("Table B1.1: Effect of treatment on speaker evaluations")  ///
					mtitles("Appropriate" "Appropriate" "Knowledgeable" "Knowledgeable" "Discuss" "Discuss") nonumbers coeflab(_cons "Constant") ///
					sfmt(%9.1f %9.0f) label
				eststo clear
					
		* Table B1.2: Effect of treatment on speaker evaluations. 
			eststo: reg worry i.emotion_treat i.fem_treat 
			eststo: reg worry i.emotion_treat i.fem_treat age educ i.republican i.woman i.white pre_worry
			eststo: reg effic1 i.emotion_treat i.fem_treat 
			eststo: reg effic1 i.emotion_treat i.fem_treat age educ i.republican i.woman i.white
			eststo: reg effic2 i.emotion_treat i.fem_treat 
			eststo: reg effic2 i.emotion_treat i.fem_treat age educ i.republican i.woman i.white
			
				esttab using"TableB12.rtf", replace var(22) model(10) ///
					nobase noomit b(3) se wide one interact(" x ") ///
					title("Table B1.2: Effect of treatment on speaker evaluations")  ///
					mtitles("Worry" "Worry" "Efficacy (1)" "Efficacy (1)" "Efficacy (2)" "Efficacy (2)") nonumbers coeflab(_cons "Constant") ///
					sfmt(%9.1f %9.0f) label
				eststo clear
					
		* Table B1.3: Effect of emotion and gender treatment on speaker evaluations. 
			eststo: reg appro i.emotion_treat##i.fem_treat age educ i.republican i.woman i.white 
			eststo: reg know i.emotion_treat##i.fem_treat age educ i.republican i.woman i.white 
			eststo: reg discuss i.emotion_treat##i.fem_treat age educ i.republican i.woman i.white
			
				esttab using"TableB13.rtf", replace var(22) model(10) ///
					nobase noomit b(3) se wide one interact(" x ") ///
					title("Table B1.3: Effect of emotion and gender treatment on speaker evaluations")  ///
					mtitles("Appropriate" "Knowledge" "Discuss") nonumbers coeflab(_cons "Constant") ///
					sfmt(%9.1f %9.0f) label
				eststo clear
			
		* Table B1.4: Effect of emotion moderated by observer gender on speaker evaluations. 
			eststo: reg appro i.emotion_treat##i.woman i.fem_treat age educ i.republican i.white 
			eststo: reg know i.emotion_treat##i.woman i.fem_treat age educ i.republican i.white 
			eststo: reg discuss i.emotion_treat##i.woman i.fem_treat age educ i.republican i.white
			
				esttab using"TableB14.rtf", replace var(22) model(10) ///
					nobase noomit b(3) se wide one interact(" x ") ///
					title("Table B1.3: Effect of emotion moderated by observer gender on speaker evaluations")  ///
					mtitles("Appropriate" "Knowledge" "Discuss") nonumbers coeflab(_cons "Constant") ///
					sfmt(%9.1f %9.0f) label
				eststo clear

					
**# Study 2 ********************************************************************

* Import data
import delimited "Study 2.csv", clear

	* Cleaning
		
		* Pre-treatment variables
			
			* Climate change attitudes
			recode sbu1104 (1/2 = 1) (3/4 = 0) (5 = .), gen(cc_real)
			gen cc_worry = (sbu1105-1)/9
				
			* Perspective taking
				gen pt1 = (5 - sbu1106)
				gen pt2 = sbu1107 - 1
				gen pt3 = sbu1108 - 1
					
				gen persp = (pt1 + pt2 + pt3)/12
				
				* Quartiles of perspective taking
				xtile perp_qt = persp, nquantiles(4)

		* Condition indicators
			recode sbu1111_treatment (1 = 1 "Pro Control") (2 = 2 "Pro Cry") (3 = 3 "Anti Control") (4 = 4 "Anti Cry"), gen(condition)
			recode sbu1111_treatment (1/2 = 1 "Pro Climate") (3/4 = 0 "Anti Climate"), gen(clim_con)
			recode sbu1111_treatment (1 3 = 0 "Control") (2 4 = 1 "Cry"), gen(cry_con)
			
		* Consistent with opinion condition
			gen consistent_clim = 0 if(clim_con == 0 & cc_real == 1)
				replace consistent_clim = 0 if(clim_con == 1 & cc_real == 0)
				replace consistent_clim = 1 if(clim_con == 0 & cc_real == 0)
				replace consistent_clim = 1 if(clim_con == 1 & cc_real == 1)
		
		* Dependent variables, recode to range from 0-1
			
			* Agree with speaker
			gen agree = (5-sbu1112)/4
			
			* Speaker appropriate
			gen appro = (sbu1113 - 1)/4
			
			* Worry about climate change
			gen worry_post = (sbu1114-1)/9
			
			* Change in worry pre-post treatment
			gen worry_change = worry_post - cc_worry
			
			* Action scale
			gen a1 = (7-sbu1115)
			gen a2 = (7-sbu1116)
			gen a3 = (7 - sbu1117) 
			gen a4 = (7 - sbu1118)
			
			gen act = (a1 + a2 + a3 + a4)/24
		
		* Socio-demographics
			
			* Partisanship 
			recode sbu1103 (1/4 = 0) (5/7 = 1) (8 = .), gen(republican)
				lab var republican "Republican"
			
			* Gender
			recode gender (1 = 0) (2 = 1), gen(female)
				lab var female "Woman"
				
			* Race
			gen white = 0 if race != .
				replace white = 1 if race == 1
					lab var white "White"
			gen black = 0 if race != . 
				replace black = 1 if race == 2
			
			* Education
			gen educ01 = (educ - 1)/5
				lab var educ01 "Education"
			
			* Income
			replace faminc_new = . if faminc_new == 97
				gen inc01 = (faminc_new - 1)/15
				lab var inc01 "Income"
			
			* Ideology
			replace ideo5 = . if ideo5 == 6
			
			* Age
			gen age = 2024-birthyr
			gen age01 = (age - 21)/75
			lab var age01 "Age"
			gen young = 1 if age < 36
				replace young = 0 if age > 35

	* Main text analysis
	
		* Figure 4.3
		forvalues f = 0/1 {
				forvalues k = 0/1 {
					
					reg appro i.cry_con##i.consistent_clim  
					margins, over(cry_con) subpop(if consistent_clim == `f' & cry_con == `k') post
					eststo app`f'`k'
					
					reg agree i.cry_con##i.consistent_clim 
					margins, over(cry_con) subpop(if consistent_clim == `f' & cry_con == `k') post
					eststo agr`f'`k'
					
					reg worry_post i.cry_con##i.consistent_clim 
					margins, over(cry_con) subpop(if consistent_clim == `f' & cry_con == `k') post
					eststo wor`f'`k'
					
					reg act i.cry_con##i.consistent_clim 
					margins, over(cry_con) subpop(if consistent_clim == `f' & cry_con == `k') post
					eststo act`f'`k'
				}
			}
			
			coefplot (app00, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(app01, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(agr00, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(agr01, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(wor00, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(wor01, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(act00, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(act01, msymbol(square) color(navy)  ciopts(lcolor(navy))), ///
				vertical title("Speaker and Participant Inconsistent") ///
				xlabel(.66 `" "Speaker""appropriate" "' .88 `" "Agree with""speaker" "' 1.12 "Worry" 1.33 "Take Action", labsize(med) nogrid) ///
				xline(.77, lpattern(dash) lcolor(gs12)) xline(1, lpattern(dash) lcolor(gs12)) xline(1.23, lpattern(dash) lcolor(gs12)) ///
				ylabel(,nogrid labsize(med)) ytitle("Predicted Values") ///
				legend(order(2 "Control" 4 "Sadness") col(2) subtit("Emotion Treatment") pos(6) size(med) ///
				region(lcolor(black))) saving("fig431.gph", replace)
				
			coefplot (app10, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(app11, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(agr10, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(agr11, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(wor10, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(wor11, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(act10, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(act11, msymbol(square) color(navy)  ciopts(lcolor(navy))), ///
				vertical title("Speaker and Participant Consistent") ytitle("Predicted Values") ///
				xlabel(.66 `" "Speaker""appropriate" "' .88 `" "Agree with""speaker" "' 1.12 "Worry" 1.33 "Take Action", labsize(med) nogrid) ///
				xline(.77, lpattern(dash) lcolor(gs12)) xline(1, lpattern(dash) lcolor(gs12)) xline(1.23, lpattern(dash) lcolor(gs12)) ///
				ylabel(,nogrid labsize(med)) ///
				legend(order(2 "Control" 4 "Sadness") col(2) subtit("Emotion Treatment") pos(6) ///
				region(lcolor(black))) saving("fig432.gph", replace)
				
			grc1leg fig432.gph fig431.gph, legendfrom(fig432.gph) ycommon
			graph export Fig43.png, height(1500) replace


		* Figure 4.4
			forvalues f = 0/1 {
				forvalues k = 0/1 {
					
					reg appro i.cry_con##i.clim_con 
					margins, over(cry_con) subpop(if clim_con == `f' & cry_con == `k') post
					eststo app`f'`k'
					
					reg agree i.cry_con##i.clim_con
					margins, over(cry_con) subpop(if clim_con == `f' & cry_con == `k') post
					eststo agr`f'`k'
					
					reg worry_post i.cry_con##i.clim_con 
					margins, over(cry_con) subpop(if clim_con == `f' & cry_con == `k') post
					eststo wor`f'`k'
					
					reg act i.cry_con##i.clim_con
					margins, over(cry_con) subpop(if clim_con == `f' & cry_con == `k') post
					eststo act`f'`k'
				}
			}
			
			coefplot (app00, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(app01, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(agr00, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(agr01, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(wor00, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(wor01, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(act00, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(act01, msymbol(square) color(navy)  ciopts(lcolor(navy))), ///
				vertical title("Speaker Anti-Climate Change") ///
				xlabel(.66 `" "Speaker""appropriate" "' .88 `" "Agree with""speaker" "' 1.12 "Worry" 1.33 "Take Action", labsize(med) nogrid) ///
				xline(.77, lpattern(dash) lcolor(gs12)) xline(1, lpattern(dash) lcolor(gs12)) xline(1.23, lpattern(dash) lcolor(gs12)) ///
				ylabel(,nogrid labsize(med)) ytitle("Predicted Values") ///
				legend(order(2 "Control" 4 "Sadness") col(2) subtit("Emotion Treatment") pos(6) size(med) ///
				region(lcolor(black))) saving("fig442.gph", replace)
				
			coefplot (app10, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(app11, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(agr10, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(agr11, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(wor10, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(wor11, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(act10, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(act11, msymbol(square) color(navy)  ciopts(lcolor(navy))), ///
				vertical title("Speaker Pro Climate Change") ytitle("Predicted Values") ///
				xlabel(.66 `" "Speaker""appropriate" "' .88 `" "Agree with""speaker" "' 1.12 "Worry" 1.33 "Take Action", labsize(med) nogrid) ///
				xline(.77, lpattern(dash) lcolor(gs12)) xline(1, lpattern(dash) lcolor(gs12)) xline(1.23, lpattern(dash) lcolor(gs12)) ///
				ylabel(,nogrid labsize(med)) ///
				legend(order(2 "Control" 4 "Sadness") col(2) subtit("Emotion Treatment") pos(6) ///
				region(lcolor(black))) saving("fig441.gph", replace)
				
			grc1leg "fig441.gph" "fig442.gph", legendfrom("fig442.gph") ycommon
			graph export "Fig44.png", height(1500) replace
		
		
	* Online Appendix
	
		* Table B2.1.1: Effect of treatment on perceived appropriateness and agreement with speaker
		eststo: reg appro i.cry_con##i.consistent_clim  
		eststo: reg appro i.cry_con##i.consistent_clim i.republican i.female i.white educ01 age01 inc01 
		eststo: reg appro i.cry_con##i.consistent_clim##c.persp
		eststo: reg agree i.cry_con##i.consistent_clim 
		eststo: reg agree i.cry_con##i.consistent_clim i.republican i.female i.white educ01 age01 inc01 
		eststo: reg agree i.cry_con##i.consistent_clim##c.persp
		
			esttab using"TableB211.rtf", replace var(22) model(10) ///
					nobase noomit b(3) se wide one interact(" x ") ///
					title("Table B2.1.1: Effect of treatment on perceived appropriateness and agreement with speaker")  ///
					mtitles("Appropriate" "Appropriate" "Appropriate" "Agree" "Agree" "Agree") nonumbers coeflab(_cons "Constant") ///
					sfmt(%9.1f %9.0f) label
				eststo clear
		
		* Table B2.1.2: Effect of treatment on worry and action 
		eststo: reg worry_post i.cry_con##i.consistent_clim 
		eststo: reg worry_post i.cry_con##i.consistent_clim i.republican i.female i.white educ01 age01 inc01 
		eststo: reg worry_post i.cry_con##i.consistent_clim##c.persp 	
		eststo: reg act i.cry_con##i.consistent_clim 
		eststo: reg act i.cry_con##i.consistent_clim i.republican i.female i.white educ01 age01 inc01 
		eststo: reg act i.cry_con##i.consistent_clim##c.persp
		
			esttab using"TableB212.rtf", replace var(22) model(10) ///
					nobase noomit b(3) se wide one interact(" x ") ///
					title("Table B2.1.2: Effect of treatment on worry and action")  ///
					mtitles("Worry" "Worry" "Worry" "Action" "Action" "Action") nonumbers coeflab(_cons "Constant") ///
					sfmt(%9.1f %9.0f) label
				eststo clear

		* Figure B1
		reg appro i.cry_con##i.consistent_clim##i.perp_qt
		margins, over(perp_qt) at(cry_con = (0(1)1))
		mplotoffset, recast(scatter) recastci(rspike) ///
			plot1opts(color(black) msymbol(circle)) ci1opts(color(black)) ///
			plot2opts(color(gs5) msymbol(square)) ci2opts(color(gs5)) ///
			plot3opts(color(gs8) msymbol(triangle)) ci3opts(color(gs8)) ///
			plot4opts(color(gs12) msymbol(diamond)) ci4opts(color(gs12)) ///
			xtitle("Emotion Treatment") xlabel(0 "Control" 1 "Sadness", nogrid labsize(med)) ///
			ytitle("Predicted Speaker Appropriateness") ylabel(,nogrid labsize(med)) title("") ///
			legend(subtit(Perspective Taking) order(5 "Lowest" 6 "Low" 7 "High" 8 "Highest") ///
			region(lcolor(black)) col(4) pos(6))
		graph export "FigB1.png", height(1500) replace

					
**# Study 3 ********************************************************************

* Import data
import delimited "Study 3.csv", clear

	* Cleaning
		
		* Pre-treatment, believe in climate change indicator
			recode clim_real (1/2 = 1 "Believe") (3/4 = 0 "Deny"), gen(cc_real)
		
		* Conditions
			rename excerpt_treat condition
			lab def cond 1 "Control" 2 "Sadness" 3 "Fear"
			lab val condition cond
			
			recode condition (1 = 0 "Control") (2/3 = 1 "Emotional"), gen(emo_condition)
			
		* Dependent variables, rescale to range from 0-1
			
			* Credible
			rename credible Credible
			gen credible = (4 - Credible)/3
		
			* Appropriate
			gen appro = (appropriate - 1)/4
			
			* Read articles by author
			rename read Read
			gen read = (Read - 1)/4 if Read < 8
			
			* Trying to persuade
			rename persuade Persuade
			gen persuade = (Persuade - 1)/4
			
			drop Credible appropriate Read Persuade
		
		* Sociodemographic control variables 
		
			* Age
			gen age = 2024 - birthyr
			gen age01 = (age - 17)/78
			lab var age01 "Age"
			
			* Gender
			recode gender (1 = 0 "Man") (2 = 1 "Woman"), gen(female)
			
			* Race
			gen black = 0 if race != .
				replace black = 1 if race == 2
				
			gen hispanic = 0 if race != .
				replace hispanic = 1 if race == 3
			
			gen white = 0 if race != .
				replace white = 1 if race == 1
				lab var white "White"
			
			* Education
			gen educ01 = (educ -1)/5
				lab var educ01 "Education"
			
			* Income
			replace faminc_new = . if faminc_new == 97
				gen inc01 = (faminc_new - 1)/15
				lab var inc01 "Income"
			
			* Partisanship 
			gen republican = 0 if pid3 != .
				replace republican = 1 if pid3 == 2
				lab var republican "Republican"
			
	* Online Appendix
	
		* Table B3.1.1: Effect of treatment on perceptions of appropriateness and persuasion attempts
		eststo: reg appro i.condition##i.cc_real [pweight = weight]
		eststo: reg appro i.condition##i.cc_real age01 i.white educ01 inc01 i.republican i.female [pweight = weight]
		eststo: reg persuade i.condition##i.cc_real [pweight = weight]
		eststo: reg persuade i.condition##i.cc_real age01 i.white educ01 inc01 i.republican i.female [pweight = weight]
		
			esttab using"TableB311.rtf", replace var(22) model(10) ///
				nobase noomit b(3) se wide one interact(" x ") ///
				title("Table B3.1.1: Effect of treatment on perceptions of appropriateness and persuasion attempts")  ///
				mtitles("Appropriate" "Appropriate" "Persuade" "Persuade") nonumbers coeflab(_cons "Constant") ///
				sfmt(%9.1f %9.0f) label
			eststo clear

		* Table B3.1.2: Effect of treatment on credibility and desire to read more by the journalist.
		eststo: reg credible i.condition##i.cc_real [pweight = weight]
		eststo: reg credible i.condition##i.cc_real age01 i.white educ01 inc01 i.republican i.female [pweight = weight]
		eststo: reg read i.condition##i.cc_real [pweight = weight]
		eststo: reg read i.condition##i.cc_real age01 i.white educ01 inc01 i.republican i.female [pweight = weight]
		
			esttab using"TableB312.rtf", replace var(22) model(10) ///
				nobase noomit b(3) se wide one interact(" x ") ///
				title("Table B3.1.2: Effect of treatment on credibility and desire to read more by the journalist")  ///
				mtitles("Credible" "Credible" "Read again" "Read again") nonumbers coeflab(_cons "Constant") ///
				sfmt(%9.1f %9.0f) label
			eststo clear
			
		* Table B3.1.3: Combining Fear and Sadness Results
		eststo: reg appro i.cc_real##i.emo_condition [pweight = weight]
		eststo: reg persuade i.cc_real##i.emo_condition [pweight = weight]
		eststo: reg credible i.cc_real##i.emo_condition [pweight = weight]
		eststo: reg read i.cc_real##i.emo_condition [pweight = weight]
			
			esttab using"TableB313.rtf", replace var(22) model(10) ///
				nobase noomit b(3) se wide one interact(" x ") ///
				title("Table B3.1.3 Combining Fear and Sadness Results")  ///
				mtitles("Appropriate" "Persuade" "Credible" "Read") nonumbers coeflab(_cons "Constant") ///
				sfmt(%9.1f %9.0f) label
			eststo clear

					
**# Study 4 ********************************************************************

* Import data
import delimited "Study 4.csv", clear

	* Cleaning
	
		* Pre-treatment
		
			* Belief indicator
			recode clim1_pre (1/2 = 1 "CC Real") (3/5 = 0 "Not Real"), gen(cc_real)
		
		* Worry about climate change
			gen worry_pre = (clim_pre2-1)/9
		
		* Conditions, adding labels
			lab def condition 0 "Text" 1 "Comment" 2 "Tweet" 3 "News"
			lab val condition condition	
		
		* Dependent variables, rescale to range from 0-1
			
			* Post-treatment worry
			gen worry_post = (clim2_post - 1)/9	
			
			* Persuasion attempt
			replace persuade = (5 - persuade)/4
			
			* Authentic
			replace authentic = (5 - authentic)/4
			
			* Trustworthy
			replace trust = (5 - trust)/4
			
			* Sad
			replace sad = (sad-1)/4
		
		* Socio-demographic controls
			
			* Age
			gen age01 = (age - 1)/7
			recode age (1/2 = 1 "Under 36") (3/8 = 0 "Over 35"), gen(young)
			
			* Gender
			recode gen (-99 = .) (1 = 0 "Not woman") (2 = 1 "Woman") (3 = 0 "Not woman"), gen(woman)
			
			* Race
			gen white = 0 if r_group !="" & r_group != "-99"
				replace white = 1 if r_group == "5"
			
			* Education
			gen educ01 = (educ - 1)/7 if educ != -99
			
			* Partisanship
			recode pid1 (1 = 1 "Republican") (2/4 = 0 "Not Republican"), gen(republican)
			recode pid1 (1 = 1 "Republican") (2 = 2 "Democrat") (3/4 = .), gen(rep_dem)

		
	* Main Text Analysis
		
		* Figure 5.2
			forvalues k = 0/2 {
				reg persuade i.condition if condition < 3
					margins, over(condition) subpop(if condition == `k') post
					eststo p`k'	
					
				reg trust i.condition if condition < 3
					margins, over(condition) subpop(if condition == `k') post
					eststo t`k'
					
				reg auth i.condition if condition < 3
					margins, over(condition) subpop(if condition == `k') post
					eststo a`k'
					
				reg sad i.condition if condition < 3
					margins, over(condition) subpop(if condition == `k') post
					eststo s`k'	
			}
			
			coefplot (p0, msymbol(circle) color(black) ciopts(lcolor(black))) ///
				(p1, msymbol(square) color(gs7)  ciopts(lcolor(gs7))) ///
				(p2, msymbol(diamond) color(gs12)  ciopts(lcolor(gs12))) ///
				(t0, msymbol(circle) color(black) ciopts(lcolor(black))) ///
				(t1, msymbol(square) color(gs7)  ciopts(lcolor(gs7))) ///
				(t2, msymbol(diamond) color(gs12)  ciopts(lcolor(gs12))) ///
				(a0, msymbol(circle) color(black) ciopts(lcolor(black))) ///
				(a1, msymbol(square) color(gs7)  ciopts(lcolor(gs7))) ///
				(a2, msymbol(diamond) color(gs12)  ciopts(lcolor(gs12))) ///
				(s0, msymbol(circle) color(black) ciopts(lcolor(black))) ///
				(s1, msymbol(square) color(gs7)  ciopts(lcolor(gs7))) ///
				(s2, msymbol(diamond) color(gs12)  ciopts(lcolor(gs12))) , ///
				vertical title("Effect of Visibility") ///
				ylabel(0.4(0.2).8, nogrid labsize(med)) ytitle("Predicted Value") ///
				xlabel(.625 `" "Persuasion""attempt" "' .875 "Trustworthy" 1.125 "Sincere" 1.375 "Sad", labsize(med) nogrid) ///
				xline(0.75, lpattern(dash) lcolor(gs12)) xline(1, lpattern(dash) lcolor(gs12))  xline(1.25, lpattern(dash) lcolor(gs12)) ///
				legend(order(2 "Text" 4 "Comment" 6 "Tweet") col(3) subtit("Platform Treatment") pos(6) ///
				region(lcolor(black))) 
			graph export "Fig52.png", height(1500) replace
		
		* Figure 5.4
			forvalues k = 2/3 {
				reg persuade i.condition if condition > 1
					margins, over(condition) subpop(if condition == `k') post
					eststo p`k'	
					
				reg trust i.condition if condition > 1
					margins, over(condition) subpop(if condition == `k') post
					eststo t`k'
					
				reg auth i.condition if condition > 1
					margins, over(condition) subpop(if condition == `k') post
					eststo a`k'
					
				reg sad i.condition if condition > 1
					margins, over(condition) subpop(if condition == `k') post
					eststo s`k'	
				}

			coefplot (p2, msymbol(circle) color(black) ciopts(lcolor(black))) ///
					(p3, msymbol(square) color(gs7)  ciopts(lcolor(gs7))) ///
					(t2, msymbol(circle) color(black) ciopts(lcolor(black))) ///
					(t3, msymbol(square) color(gs7)  ciopts(lcolor(gs7))) ///
					(a2, msymbol(circle) color(black) ciopts(lcolor(black))) ///
					(a3, msymbol(square) color(gs7)  ciopts(lcolor(gs7))) ///
					(s2, msymbol(circle) color(black) ciopts(lcolor(black))) ///
					(s3, msymbol(square) color(gs7)  ciopts(lcolor(gs7))), ///
					vertical title() ///
					ylabel(0.4(0.1).7, nogrid labsize(med)) ///
					xlabel(.625 `" "Persuasion""attempt" "' .875 "Trustworthy" 1.125 "Sincere" 1.375 "Sad", labsize(med) nogrid) ///
					xline(0.75, lpattern(dash) lcolor(gs12)) xline(1, lpattern(dash) lcolor(gs12))  xline(1.25, lpattern(dash) lcolor(gs12)) ///
					legend(order(2 "Tweet" 4 "News Quote") col(3) subtit("Platform Treatment") pos(6) ///
					region(lcolor(black))) 
				graph export "Fig54.png", height(1500) replace
		
		
	* Online Appendix
		
		* Figure C1
			reg persuade i.condition##i.young
				margins, at(condition =(2(1)3)) over(young)
					mplotoffset, recast(scatter) ///
					plot1opts(msymbol(circle) mcolor(black)) ///
					plot2opts(msymbol(square) mcolor(gs7)) ///
					ci1opts(color(black)) ci2opts(color(gs7)) ///
					ylabel(,nogrid labsize(med)) xlabel(, nogrid labsize(med)) ///
					xtitle("Platform", size(med)) ytitle("Predicted Value", size(med)) ///
					title("Persuasion Attempt", ring(0) size(medlarge)) ///
					legend(order(3 "Under 36" 4 "Over 35") title("Age", size(med)) col(2) size(med) region(lcolor(black)) pos(6)) ///
					saving("age1.gph", replace)
							
			reg trust i.condition##i.young
				margins, at(condition = (2(1)3)) over(young)
				mplotoffset, recast(scatter) ///
					plot1opts(msymbol(circle) mcolor(black)) ///
					plot2opts(msymbol(square) mcolor(gs7)) ///
					ci1opts(color(black)) ci2opts(color(gs7)) ///
					ylabel(,nogrid labsize(med)) xlabel(, nogrid labsize(med)) ///
					xtitle("Platform", size(med)) ytitle("Predicted Value", size(med)) ///
					title("Trustworthy", ring(0) size(medlarge)) ///
					legend(order(3 "Under 36" 4 "Over 35") title("Age", size(medlarge)) col(2) size(medlarge) region(lcolor(black)) pos(6)) ///
					saving("age2.gph", replace)
							
			reg auth i.condition##i.young 
				margins, at(condition = (2(1)3)) over(young)
				mplotoffset, recast(scatter) ///
					plot1opts(msymbol(circle) mcolor(black)) ///
					plot2opts(msymbol(square) mcolor(gs7)) ///
					ci1opts(color(black)) ci2opts(color(gs7)) ///
					ylabel(,nogrid labsize(med)) xlabel(, nogrid labsize(med)) ///
					xtitle("Platform", size(med)) ytitle("Predicted Value", size(med)) ///
					title("Sincere", ring(0) size(medlarge)) ///
					legend(order(3 "Under 36" 4 "Over 35") title("Age", size(medlarge)) col(2) size(medlarge) region(lcolor(black)) pos(6)) ///
					saving("age3.gph", replace)
							
			reg sad i.condition##i.young
				margins, at(condition = (2(1)3)) over(young)
				mplotoffset, recast(scatter) ///
					plot1opts(msymbol(circle) mcolor(black)) ///
					plot2opts(msymbol(square) mcolor(gs7)) ///
					ci1opts(color(black)) ci2opts(color(gs7)) ///
					ylabel(,nogrid labsize(med)) xlabel(, nogrid labsize(med)) ///
					xtitle("Platform", size(med)) ytitle("Predicted Value", size(med)) ///
					title("Sad", ring(0) size(medlarge)) ///
					legend(order(3 "Under 36" 4 "Over 35") title("Age", size(medlarge)) col(2) size(medlarge) region(lcolor(black)) pos(6)) ///
					saving("age4.gph", replace)
			
			grc1leg "age1.gph" "age2.gph" "age3.gph" ///
				"age4.gph", legendfrom("age1.gph") ycommon
			graph export "FigC1.png", replace height(1500)
					
		* Table C1.1.2: The effect of publicity on perceived persuasion attempts and trustworthiness
		eststo: reg persuade i.condition if condition < 3
		eststo: reg persuade i.condition age01 i.white educ01 i.republican i.woman if condition < 3	
		eststo: reg trust i.condition if condition < 3
		eststo: reg trust i.condition age01 i.white educ01 i.republican i.woman if condition < 3
			
			esttab using"TableC112.rtf", replace var(22) model(10) ///
					nobase noomit b(3) se wide one interact(" x ") ///
					title("Table C1.1.2: The effect of publicity on perceived persuasion attempts and trustworthiness")  ///
					mtitles("Persuade" "Persuade" "Trust" "Trust") nonumbers coeflab(_cons "Constant") ///
					sfmt(%9.1f %9.0f) label
				eststo clear
		
		* Table C1.1.3: The effect of publicity on perceived authenticity and sadness of the speaker. 
		eststo: reg auth i.condition if condition < 3
		eststo: reg auth i.condition age01 i.white educ01 i.republican i.woman if condition < 3	
		eststo: reg sad i.condition if condition < 3
		eststo: reg sad i.condition age01 i.white educ01 i.republican i.woman if condition < 3
			
			esttab using"TableC113.rtf", replace var(22) model(10) ///
					nobase noomit b(3) se wide one interact(" x ") ///
					title("Table C1.1.3: The effect of publicity on perceived authenticity and sadness of the speaker")  ///
					mtitles("Authentic" "Authentic" "Sad" "Sad") nonumbers coeflab(_cons "Constant") ///
					sfmt(%9.1f %9.0f) label
				eststo clear
	
		* Table C1.1.4. The effect of gating on perceived persuasion attempts and trustworthiness. 
		eststo: reg persuade i.condition if condition > 1
		eststo: reg persuade i.condition age01 i.white educ01 i.republican i.woman if condition > 1
		eststo: reg trust i.condition if condition > 1
		eststo: reg trust i.condition age01 i.white educ01 i.republican i.woman if condition > 1
			
			esttab using"TableC114.rtf", replace var(22) model(10) ///
					nobase noomit b(3) se wide one interact(" x ") ///
					title("Table C1.1.4. The effect of gating on perceived persuasion attempts and trustworthiness")  ///
					mtitles("Persuade" "Persuade" "Trust" "Trust") nonumbers coeflab(_cons "Constant") ///
					sfmt(%9.1f %9.0f) label
				eststo clear
				
		* Table C1.1.5. The effect of gating on perceived authenticity and sadness of the speaker
		eststo: reg auth i.condition if condition > 1
		eststo: reg auth i.condition age01 i.white educ01 i.republican i.woman if condition > 1
		eststo: reg sad i.condition if condition > 1
		eststo: reg sad i.condition age01 i.white educ01 i.republican i.woman if condition > 1
			
			esttab using"TableC115.rtf", replace var(22) model(10) ///
					nobase noomit b(3) se wide one interact(" x ") ///
					title("Table C1.1.5. The effect of gating on perceived authenticity and sadness of the speaker")  ///
					mtitles("Authentic" "Authentic" "Sad" "Sad") nonumbers coeflab(_cons "Constant") ///
					sfmt(%9.1f %9.0f) label
				eststo clear
				
		* Table C1.1.6. The moderating effect of age on speaker perceptions across platforms
		eststo: reg persuade i.condition##i.young if condition > 1
		eststo: reg trust i.condition##i.young if condition > 1
		eststo: reg auth i.condition##i.young if condition > 1
		eststo: reg sad i.condition##i.young if condition > 1
			
			esttab using"TableC116.rtf", replace var(22) model(10) ///
					nobase noomit b(3) se wide one interact(" x ") ///
					title("Table C1.1.6. The moderating effect of age on speaker perceptions across platforms")  ///
					mtitles("Persuasion" "Trust" "Authentic" "Sad") nonumbers coeflab(_cons "Constant") ///
					sfmt(%9.1f %9.0f) label
				eststo clear
		
				
		* Table C1.1.7. The moderating effect of partisanship on speaker perceptions across platforms. 
		eststo: reg persuade i.condition##i.rep_dem if condition > 1
		eststo: reg trust i.condition##i.rep_dem if condition > 1
		eststo: reg auth i.condition##i.rep_dem if condition > 1
		eststo: reg sad i.condition##i.rep_dem if condition > 1
			
			esttab using"TableC117.rtf", replace var(22) model(10) ///
					nobase noomit b(3) se wide one interact(" x ") ///
					title("Table C1.1.7. The moderating effect of partisanship on speaker perceptions across platforms")  ///
					mtitles("Persuasion" "Trust" "Authentic" "Sad") nonumbers coeflab(_cons "Constant") ///
					sfmt(%9.1f %9.0f) label
				eststo clear

**# Study 5 Pre-test ***********************************************************

* Import data
import delimited "Study 5 Pre Test.csv", clear

	* Cleaning
	
		* Label conditions
			lab def s_condition 0 "Original" 1 "IPCC Kids" 2 "No Kids"
			lab val s_condition s_condition
			
		* drop missing values on DVs
			replace persuade = . if persuade == -99
			replace sincere = . if sincere == -99
			replace trustworthy = . if trustworthy == -99
			replace appropriate = . if appropriate == -99
			replace sad = . if sad == -99
		
		* Recode DVs to range from 0-1
		
			* Trying to persuade
			replace persuade = (5 - persuade)/4 
			
			* Sincere
			replace sincere = (5 - sincere)/4 
			
			* Trustworthy
			replace trustworthy = (5 - trustworthy)/4 
			
			* Appropriate
			replace appropriate = (5 - appropriate)/4 
			
			* Sad
			replace sad = (sad - 1)/4
		
	* Online Appendix
		
		* Table D1: Pre-test Results 
			eststo: reg persuade i.s_condition
			eststo: reg sincere i.s_condition
			eststo: reg trustworthy i.s_condition
			eststo: reg appropriate i.s_condition
			eststo: reg sad i.s_condition
		
			esttab using"TableD1.rtf", replace var(22) model(10) ///
					nobase noomit b(3) se wide one interact(" x ") ///
					title("Table D1: Pre-test Result")  ///
					mtitles("Persuade" "Sincere" "Trustworthy" "Appropriate" "Sad") nonumbers coeflab(_cons "Constant") ///
					sfmt(%9.1f %9.0f) label
				eststo clear
		
		* Figure D1
		
			* Collapse data to make bar graphs
				gen id = _n
				collapse (mean) persuade = persuade (sd) sdpersuade = persuade ///
				(mean) trust = trustworthy (sd) sdtrust = trustworthy ///
				(mean) sad = sad (sd) sdsad = sad ///
				(mean) sincere = sincere (sd) sdsincere = sincere ///
				(mean) appropriate = appropriate (sd) sdappropriate = appropriate ///
				(count) n= id, by(s_condition)
				
				generate hipers = persuade + (1.96*(sdpersuade / sqrt(n-1)))
				generate lopers = persuade - (1.96*(sdpersuade / sqrt(n-1)))
				generate hitrust = trust + (1.96*(sdtrust / sqrt(n-1))) 
				generate lotrust = trust - (1.96*(sdtrust / sqrt(n-1)))
				generate hisad = sad + (1.96*(sdsad / sqrt(n-1))) 
				generate losad = sad - (1.96*(sdsad / sqrt(n-1)))
				generate hiappropriate = appropriate + (1.96*(sdappropriate / sqrt(n-1))) 
				generate loappropriate = appropriate - (1.96*(sdappropriate / sqrt(n-1)))
				generate hisince = sincere + (1.96*(sdsincere / sqrt(n-1)))
				generate losince = sincere - (1.96*(sdsincere / sqrt(n-1)))
		
			* Generate each panel
				twoway (bar persuade s_condition, lcolor(black) lwidth(0.4) fcolor(white) barwidth(0.5)) ///
					(rcap hipers lopers s_condition, color(black)), ///
					ylabel(,nogrid) xlabel(0 "Original" 1 "IPCC Kids" 2 "IPCC No Kids", nogrid) ///
					xtitle("") ytitle("Patricia is trying to persuade") legend(off) ///
					saving("figD11.gph", replace)
					
				twoway (bar trust s_condition, lcolor(black) lwidth(0.4) fcolor(white) barwidth(0.5)) ///
					(rcap hitrust lotrust s_condition, color(black)), ///
					ylabel(,nogrid) xlabel(0 "Original" 1 "IPCC Kids" 2 "IPCC No Kids", nogrid) ///
					xtitle("") ytitle("Patricia is trustworthy") legend(off) ///
					saving("figD12.gph", replace)
					
				twoway (bar appropriate s_condition, lcolor(black) lwidth(0.4) fcolor(white) barwidth(0.5)) ///
					(rcap hiappropriate loappropriate s_condition, color(black)), ///
					ylabel(,nogrid) xlabel(0 "Original" 1 "IPCC Kids" 2 "IPCC No Kids", nogrid) ///
					xtitle("") ytitle("Patricia is appropriate") legend(off) ///
					saving("figD13.gph", replace)
					
				twoway (bar sincere s_condition, lcolor(black) lwidth(0.4) fcolor(white) barwidth(0.5)) ///
					(rcap hisince losince s_condition, color(black)), ///
					ylabel(,nogrid) xlabel(0 "Original" 1 "IPCC Kids" 2 "IPCC No Kids", nogrid) ///
					xtitle("") ytitle("Patricia is sincere") legend(off) ///
					saving("figD14.gph", replace)

				twoway (bar sad s_condition, lcolor(black) lwidth(0.4) fcolor(white) barwidth(0.5)) ///
					(rcap hisad losad s_condition, color(black)), ///
					ylabel(,nogrid) xlabel(0 "Original" 1 "IPCC Kids" 2 "IPCC No Kids", nogrid) ///
					xtitle("") ytitle("Patricia is sad") legend(off) ///
					saving("figD15.gph", replace)
			
			* Combine and export graph
				gr combine "figD11.gph" "figD12.gph" "figD13.gph" ///
					"figD14.gph" "figD15.gph"
				graph export "FigD1.png", height(1500) replace
					
**# Study 5 ********************************************************************

* Import data
import delimited "Study 5.csv", clear

	* Cleaning
	
		* Socio-demographic control variables
		
			* Gender
			recode gender (1 = 0 "Not Woman") (2 = 1 "Woman") (3 = 0 "Not Woman"), gen(female)
		
			* Age
			replace age = . if age > 99
			gen age01 = (age - 18)/81
			
			* Education
			gen educ01 = (education - 1)/6
			
			* Income
			replace income = . if income == 18
			gen inc01 = (income-1)/16
			
			* Race
			gen white = 0 if ethnicity != ""
				replace white = 1 if ethnicity == "1"
			
			* Partisanship 
			recode pid (1 = 1 "Republican") (2/4 = 0 "Not Republican"), gen(republican)
			
		* Experimental conditions
		
			* Indicator for TikTok versus tweet
			recode condition_num (1 = 1 "Tweet") (2/3 = 2 "TikTok"), gen(tiktok)
			
			* Labeling full conditions
			lab def condition 1 "Tweet" 2 "Neutral TikTok" 3 "Sad TikTok"
			lab val condition_num condition
			
		* Dependent variables (re-scale to 0-1)
			
			* Trying to persuade
			replace persuade = (persuade - 1)/4
			
			* Sincere
			replace sincere = (sincere - 1)/4
			
			* Trustworthy
			replace trust = (trust - 1)/4
			
			* Appropriate
			replace appro = (appro - 1)/4
			
			* Sad
			replace sad = (sad - 1)/4
			
	* Main text analysis
	
		* Figure 6.2
		
			* Note: This loop captures values for figures 6.2 and 6.3
			forvalues k =1/3 {
					reg appro i.condition_num 
						margins, over(condition_num) subpop(if condition_num == `k') post
						eststo appro`k'
						
					reg sincere i.condition_num 
						margins, over(condition_num) subpop(if condition_num == `k') post
						eststo since`k'
						
					reg persuade i.condition_num 
						margins, over(condition_num) subpop(if condition_num == `k') post
						eststo pers`k'
						
					reg sad i.condition_num 
						margins, over(condition_num) subpop(if condition_num == `k') post
						eststo sad`k'
						
					reg trust i.condition_num 
						margins, over(condition_num) subpop(if condition_num == `k') post
						eststo trust`k'
			}
			
			coefplot (appro1, msymbol(circle) color(black) ciopts(lcolor(black))) ///
				(appro2, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(appro3, msymbol(triangle) color(maroon)  ciopts(lcolor(maroon))) ///
				(since1, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(since2, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(since3, msymbol(triangle) color(maroon)  ciopts(lcolor(maroon))) ///
				(sad1, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(sad2, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(sad3, msymbol(triangle) color(maroon)  ciopts(lcolor(maroon))), ///
				vertical title("") ytitle("Predicted Value") ///
				ylabel(0.4(0.2).8, nogrid labsize(med)) xlabel(0.7 `" "Speaker""Appropriate" "' ///
				1 `" "Speaker""Sincere" "'  1.3 `" "Speaker""Sad" "' , labsize(med)) ///
				xline(0.85, lpattern(dash) lcolor(gs12)) xline(1.15, lpattern(dash) lcolor(gs12)) ///
				legend(order(2 "Tweet" 4 "Neutral TikTok" 6 "Sad TikTok") col(3) subtit("Condition") pos(6) ///
				region(lcolor(black))) ysize(6) 
			graph export "Fig62.png", height(1500) replace
	
		* Figure 6.3
			coefplot (pers1, msymbol(circle) color(black) ciopts(lcolor(black))) ///
				(pers2, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(pers3, msymbol(triangle) color(maroon)  ciopts(lcolor(maroon))) ///
				(trust1, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
				(trust2, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
				(trust3, msymbol(triangle) color(maroon)  ciopts(lcolor(maroon))), ///
				vertical title("") ytitle("Predicted Value") ///
				ylabel(0.4(0.2).8, nogrid labsize(med)) xlabel(0.8 `" "Persuasion""Attempt" "' 1.2 "Trustworthy", labsize(med)) ///
				xline(1, lpattern(dash) lcolor(gs12))  ///
				legend(order(2 "Tweet" 4 "Neutral TikTok" 6 "Sad TikTok") col(3) subtit("Condition") pos(6) ///
				region(lcolor(black))) xsize(5) ysize(6)
			graph export "Fig63.png", height(1500) replace
		
	* Online Appendix
	
		* Table D1.2.1: Effect of images on evaluations of the speaker
		eststo: reg appro i.condition_num 
		eststo: reg appro i.condition_num i.female age01 educ01 inc01 i.white i.republican
		eststo: reg sincere i.condition_num 
		eststo: reg sincere i.condition_num i.female age01 educ01 inc01 i.white i.republican
		eststo: reg sad i.condition_num
		eststo: reg sad i.condition_num i.female age01 educ01 inc01 i.white i.republican
		
			esttab using"TableD121.rtf", replace var(22) model(10) ///
					nobase noomit b(3) se wide one interact(" x ") ///
					title("Table D1.2.1: Effect of images on evaluations of the speaker")  ///
					mtitles("Appropriate" "Appropriate" "Sincere" "Sincere" "Sad" "Sad") nonumbers coeflab(_cons "Constant") ///
					sfmt(%9.1f %9.0f) label
				eststo clear
		
		* Table D1.2.2: Effect of images on evaluations of the speaker
		eststo: reg persuade i.condition_num
		eststo: reg persuade i.condition_num i.female age01 educ01 inc01 i.white i.republican
		eststo: reg trust i.condition_num
		eststo: reg trust i.condition_num
		
			esttab using"TableD122.rtf", replace var(22) model(10) ///
					nobase noomit b(3) se wide one interact(" x ") ///
					title("Table D1.2.2: Effect of images on evaluations of the speaker")  ///
					mtitles("Persuasion" "Persuasion" "Trustworthy" "Trustworthy") nonumbers coeflab(_cons "Constant") ///
					sfmt(%9.1f %9.0f) label
				eststo clear
	
**# Study 6 & Study 4 post-hoc check *******************************************

* Import data
import delimited "Study 6.csv", clear		
	
	* Cleaning for Study 6 Analysis
		
		* Label condition
			lab def condition 1 "No Face" 2 "Neutral" 3 "Crying"
			lab val condition condition
		
		* Rescale dependent variables to range from 0-1
			
			* Trying to persuade
			replace persuade = (persuade - 1)/4
			
			* Sincere
			replace sincere = (sincere - 1)/4
			
			* Trustworthy
			replace trust = (trust - 1)/4
			
			* Appropriate
			replace appropriate = (appropriate - 1)/4
			
			* Sad
			replace sad = (sad - 1)/4
			
		* Recode social media use variables
			
			* Indicators for using each social media site
			recode full_some_1 (1 = 1) (-99 = 0), gen(has_twitter)
			recode full_some_2 (1 = 1) (-99 = 0), gen(has_facebook)
			recode full_some_3 (1 = 1) (-99 = 0), gen(has_tiktok)
				lab def tiktok 0 "No TikTok" 1 "Has TikTok"
				lab val has_tiktok tiktok
			recode full_some_4 (1 = 1) (-99 = 0), gen(has_insta)
			recode full_some_6 (1 = 1) (-99 = 0), gen(has_linkedin)
			
			* Count of sites used
			gen social_count = has_twitter + has_facebook + has_tiktok + has_insta + has_linkedin
					
			* Tiktok use
			replace tiktok = 6 - tiktok
				replace tiktok = 0 if tiktok == 105
				replace tiktok = 0 if has_tiktok == 0
				
		* Demographic and climate belief variables
		
			* Age
			replace age = (age - 1)/7
			
			* Education
			replace educ = (educ - 1)/7
			
			* Partisanship
			recode pid1 (1 = 1 "Republican") (2/4 = 0 "Not Republican"), gen(republican)
			
			* Climate change belief indicator
			recode clim1_pre (1/2 = 1) (3/5 = 0), gen(cc_real)
			
	* Main text analysis
	
		* Figure 6.4
		forvalues k =1/3 {
		
		reg appropriate i.condition
			margins, over(condition) subpop(if condition == `k') post
			eststo appro`k'
					
		reg persuade i.condition
			margins, over(condition) subpop(if condition == `k') post
			eststo pers`k'
		
		reg sincere i.condition
			margins, over(condition) subpop(if condition == `k') post
			eststo since`k'
		
		reg trust i.condition
			margins, over(condition) subpop(if condition == `k') post
			eststo trust`k'
			
		reg sad i.condition
			margins, over(condition) subpop(if condition == `k') post
			eststo sad`k'
	
		}
		
		coefplot (appro1, msymbol(circle) color(black) ciopts(lcolor(black))) ///
			(appro2, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
			(appro3, msymbol(triangle) color(maroon)  ciopts(lcolor(maroon))) ///
			(since1, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
			(since2, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
			(since3, msymbol(triangle) color(maroon)  ciopts(lcolor(maroon))) ///
			(sad1, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
			(sad2, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
			(sad3, msymbol(triangle) color(maroon)  ciopts(lcolor(maroon))), ///
			vertical title("") ytitle("Predicted Value") ///
			ylabel(0.2(0.2).8, nogrid labsize(med)) xlabel(0.7 `" "Speaker""Appropriate" "' 1 `" "Speaker""Sincere" "'  1.3 `" "Speaker""Sad" "' , labsize(med)) ///
			xline(0.85, lpattern(dash) lcolor(gs12)) xline(1.15, lpattern(dash) lcolor(gs12)) ///
			legend(order(2 "No Face" 4 "Neutral Face" 6 "Sad Face") col(3) subtit("Condition") pos(6) ///
			region(lcolor(black))) ysize(6) fxsize(70) saving("Fig641.gph", replace)
			
		coefplot (pers1, msymbol(circle) color(black) ciopts(lcolor(black))) ///
			(pers2, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
			(pers3, msymbol(triangle) color(maroon)  ciopts(lcolor(maroon))) ///
			(trust1, msymbol(circle) color(black)  ciopts(lcolor(black))) ///
			(trust2, msymbol(square) color(navy)  ciopts(lcolor(navy))) ///
			(trust3, msymbol(triangle) color(maroon)  ciopts(lcolor(maroon))), ///
			vertical title("") ytitle("Predicted Value") ///
			ylabel(0.2(0.2).8, nogrid labsize(med)) xlabel(0.8 `" "Persuasion""Attempt" "' 1.2 "Trustworthy", labsize(med)) ///
			xline(1, lpattern(dash) lcolor(gs12))  ///
			legend(order(2 "No Face" 4 "Neutral Face" 6 "Sad Face") col(3) subtit("Condition") pos(6) ///
			region(lcolor(black))) ysize(6) fxsize(50) saving("Fig642.gph", replace)
			
		grc1leg2 "Fig641.gph" "Fig642.gph", legendfrom("Fig642.gph")
		graph export "Fig64.png", height(1500) replace
		
	* Online Appendix
	
		* Table D2.1.1: Effect of images on evaluations of the speaker. 
			eststo: reg appropriate i.condition
			eststo: reg sincere i.condition
			eststo: reg trust i.condition 
			eststo: reg persuade i.condition
			eststo: reg sad i.condition
			
			esttab using"TableD211.rtf", replace var(22) model(10) ///
					nobase noomit b(3) se wide one interact(" x ") ///
					title("Table D2.1.1: Effect of images on evaluations of the speaker")  ///
					mtitles("Appropriate" "Sincere" "Trustworthy" "Persuade" "Sad") nonumbers coeflab(_cons "Constant") ///
					sfmt(%9.1f %9.0f) label
				eststo clear
			
		* Table D2.1.2: Effect of images on evaluations of the speaker (Indicator for TikTok use)
			eststo: reg appropriate i.condition##i.has_tiktok
			eststo: reg sincere i.condition##i.has_tiktok
			eststo: reg trust i.condition##i.has_tiktok
			eststo: reg persuade i.condition##i.has_tiktok
			eststo: reg sad i.condition##i.has_tiktok
		
			esttab using"TableD212.rtf", replace var(22) model(10) ///
					nobase noomit b(3) se wide one interact(" x ") ///
					title("Table D2.1.2: Effect of images on evaluations of the speaker")  ///
					mtitles("Appropriate" "Sincere" "Trustworthy" "Persuade" "Sad") nonumbers coeflab(_cons "Constant") ///
					sfmt(%9.1f %9.0f) label
				eststo clear
			
		* Table D2.1.3: Effect of images on evaluations of the speaker (Continuous variable for TikTok use)
			eststo: reg appropriate i.condition##c.tiktok
			eststo: reg sincere i.condition##c.tiktok
			eststo: reg trust i.condition##c.tiktok
			eststo: reg persuade i.condition##c.tiktok
			eststo: reg sad i.condition##c.tiktok
				
			esttab using"TableD213.rtf", replace var(22) model(10) ///
					nobase noomit b(3) se wide one interact(" x ") ///
					title("Table D2.1.3: Effect of images on evaluations of the speaker")  ///
					mtitles("Appropriate" "Sincere" "Trustworthy" "Persuade" "Sad") nonumbers coeflab(_cons "Constant") ///
					sfmt(%9.1f %9.0f) label
				eststo clear

	* Post Hoc-Check analysis
	
		**Any treatment effects? (pre-registered assumption: none)
		ttest sought, by(teachertreat)
		ttest rep, by(teachertreat)
		ttest control, by(teachertreat)

		**No treatment diffs, pre-registered analysis -- treat the "teacher" as a nuisance factor

		**People overwhelmingly believe the journalist sought out the speaker
		tab sought

		**But they do not think this person is representative of the public
		tab rep

		**modal response: it is on the journalist. 
		tab control

		**Self-promotion
		tab selfpromotion
		**And, they view social media as being most visible to a broad audience

	
		
		
